#!/bin/bash
#!/bin/bash
echo $1 >> /etc/keepalived/notify.txt
case "$1" in
    master)
        echo '用法:notify.sh {master}'
        docker start nginx
        exit 0
    ;;
    backup)
        echo '用法:notify.sh {backup}'
        docker start nginx
        exit 0
    ;;
    fault)
        echo '用法:notify.sh {fault}'
        docker stop nginx
        exit 0
    ;;
    *)
        echo '用法:notify.sh {master|backup|fault}'
        exit 1
    ;;
esac